﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace ManagerFrontEnd
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        private static ResourceDictionary Skin;

        private UserControl currentNavigationUC;
        private UserControl currentContentUC;


        public MainWindow()
        {
            InitializeComponent();

            Skin = new ResourceDictionary();
            Skin.Source = new Uri("Skin.xaml", UriKind.Relative);
            ApplySkin(Skin);


        }


        void ApplySkin(ResourceDictionary newSkin)
        {
            // Collect the current skin and remove before adding new skin.
            Collection<ResourceDictionary> skins = Application.Current.Resources.MergedDictionaries;
            while (skins.Count != 0) skins.RemoveAt(0);

            skins.Add(newSkin);
        }
    }
}
